<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/fn.tld" prefix="fn" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/core.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/Hpage.tld" prefix="paging" %>
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<jsp:include page="../pub_head.jsp">
<jsp:param value="2" name="type"/>
</jsp:include>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<META content="zh-cn" http-equiv="Content-Language">

<META content="text/html; charset=UTF-8" http-equiv="Content-Type">

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

<meta name="keywords" content="${query.cityName }酒店预订|${query.cityName }特价酒店|${query.cityName }特价酒店预订|${query.cityName }经济型酒店预订" />

<meta name="description" content="官方网站酒店预订频道提供${query.cityName }酒店预订,${query.cityName }特价酒店预订，${query.cityName }经济型酒店查询预订等服务，是您订广州酒店的最佳选择。" />	

<title>${query.cityName }酒店预订–国内酒店预订查询服务</title>


<link href="css/global.css" type="text/css" rel="stylesheet" media="all" />

<link href="css/hotel.css" type="text/css" rel="stylesheet" media="all" />

<link href="css/datepicker.css" type="text/css" rel="stylesheet" />

<link href="css/datepicker1.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="script/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="script/RightFloat.js"></script>

</head>

<body>

<!--  -->
<!--Header Begin-->

<link href="css/global.css" type="text/css" rel="stylesheet" media="all" />


<!--Header include start-->
<!-- top 专题小头部 end -->

<!--Header include end-->

<!--Header End-->
<div class="wrapper clearfix">

  <div class="hstep" style="display: none">当前位置：<a href="/">首页</a> &gt; <a href="/hotel/">订酒店</a> &gt; <a href="/hotel/china-guangzhou-hotel.html" title="${query.cityName }酒店预订">${query.cityName }酒店</a></div>

  <div class="stepout fillingt hotel">

    <h1>${query.cityName }酒店预订</h1>

    <ul>

      <li class="current">选择</li>

      <li>预订</li>

      <li>核对</li>

      <li>完成</li>

    </ul>

  </div>

  <form name="form1" id="form1" action="hotel/loadHotels.do" method="get">
  <!--Left Sidebar Begin-->
	<input type="hidden" name="op" value="baseHotels" />
  <div class="mainorder left">

    <!--Search Begin-->

    <div class="sHot">

      <div class="searchhot clearfix">

        <ul>

          <li>城市

          	 <input type="text" id="Name_firstleaveCity" name="Name_firstleaveCityName" value="${query.cityName}" class="onIIn" onfocus="javascript:checkCity()" onchange="javascript:setInputValueHotel(this.value)"/>

         	<div id="errorMessageCity" class="errorBottomPrompt" style="display: none;">

              <div class="pmt" id="errorContentCity">

                <p></p>

                <div class="inArr"></div>

              </div>

            </div>

          </li>

          <li>入住日期

          	<input type="text" id="date" readonly="readonly" name="date2" value="${query.checkInDate }" class="onIIn datepicker" onchange="javascript:checkEndDate();" onclick="javascript:closeEndDate();"/>

          </li>

          <li>离店日期

            <input type="text" id="enddate" readonly="readonly" name="enddate2" value="${query.checkOutDate }" class="onIIn datepicker1" onchange="javascript:checkDate();" />

            <div id="errorMessage" class="errorBottomPrompt" style="display: none;">

              <div class="pmt" id="errorContent">

                <p></p>

                <div class="inArr"></div>

              </div>

        </div>

          </li>

          <li>酒店名称


			<input type="text" class="onIIn" name="hotel2" id="hotel2" onblur="if(this.value=='')this.value='请输入酒店名称';"  onfocus="if(this.value=='请输入酒店名称')this.value='';" value="${query.hotelItem!=''?query.hotelItem:'请输入酒店名称'}" />

          </li>

          <li>
            <input type="button" value="确定" class="cxbtn" name="hotelSubmit" onclick="setDefaultPage('pages','${query.cityCode}')"  />

            <input type="hidden" id="firstleaveCity" value="${query.cityCode }" name="firstleaveCityName" />

            <input type="hidden" id="orderby" name="orderby" value="null" />

          </li>

        </ul>

      </div>

    </div>
    

    <!--Search Een-->

    <div class="hbox">

      <!--Filter criteria Begin-->

      <div class="searchfilter clearfix">

        <ul>

          <li class="jGe"><span>价格：</span><a class='${fn:trim(query.priceValue)==""?"current":""}' href="javascript:setPriceLevel('');">不限</a>

										<a title="200元以下酒店" class='${fn:trim(query.priceValue)=="0"?"current":""}' href="javascript:setPriceLevel('0');" alt="200元以下酒店">200元以下</a>

										<a title="200-400元之间酒店" class='${fn:trim(query.priceValue)=="1"?"current":""}' href="javascript:setPriceLevel('1');" alt="200-400元之间酒店">200-400元</a>

										<a title="400-600元之间酒店" class='${fn:trim(query.priceValue)=="2"?"current":""}' href="javascript:setPriceLevel('2');" alt="400-600元之间酒店">400-600元</a>

										<a title="600-800元之间酒店" class='${fn:trim(query.priceValue)=="3"?"current":""}' href="javascript:setPriceLevel('3');" alt="600-800元之间酒店">600-800元</a>

										<a title="800元以上酒店" class='${fn:trim(query.priceValue)=="4"?"current":""}' href="javascript:setPriceLevel('4');" alt="800元以上酒店">800元以上</a>

										<input type="hidden" id="pricevalue" name="pricevalue" value="${query.priceValue }" />							

          </li>

          <li class="sSi"><span>星级：</span>
          								<a class='${fn:trim(query.starCode)==""?"current":""}' href="javascript:setStarLevel('');">不限</a>

										<a title="两星/经济酒店" class='${fn:trim(query.starCode)=="2"?"current":""}' href="javascript:setStarLevel('2')" alt="两星/经济酒店">两星/经济</a>

										<a title="三星/舒适酒店" class='${fn:trim(query.starCode)=="3"?"current":""}' href="javascript:setStarLevel('3')" alt="三星/舒适酒店">三星/舒适</a>

										<a title="四星/高档酒店" class='${fn:trim(query.starCode)=="4"?"current":""}' href="javascript:setStarLevel('4')" alt="四星/高档酒店">四星/高档</a>

										<a title="五星/豪华酒店" class='${fn:trim(query.starCode)=="5"?"current":""}' href="javascript:setStarLevel('5')" alt="五星/豪华酒店">五星/豪华</a>

										<input type="hidden" id="starvalue" name="starvalue" value="${query.starCode }" />


          </li>
          <li class="weiz wid"><span>位置：</span>
          <c:if test="${businessVals!=null || regionVals!=null}">
				<a href="javascript:checkBusiness();">不限</a>
						  </c:if>
          <c:if test="${businessVals==null && regionVals==null}">
				<a class="current">不限</a>
				<logic:iterate id="biness" name="bussinessInfos" indexId="biness_index" length="3">
							 <input type="checkbox" name="business" class="chemore" value="${biness.busCode }" id="businessId${biness_index }" />
           								  <label title="${biness.busName }">${biness.busName }</label>
							</logic:iterate>
				</c:if>
		<c:if test="${businessVals!=null || regionVals!=null}">
				         <c:if test="${businessVals!=null}">
							<logic:iterate id="biness_val" name="businessVals" indexId="biness_id">
							<logic:iterate id="biness" name="bussinessInfos" indexId="biness_index">
								<c:if test="${biness.busCode==biness_val}">
           						<a class="current" title="${biness.busName }">${biness.busName }</a>
           						<input name="businessinfo" id="businessinfo${biness_index }" type="hidden" value="${biness_val }"/>							
								</c:if>
							</logic:iterate></logic:iterate>
						  </c:if>
<c:if test="${regionVals!=null}">
<logic:iterate id="reg_val" name="regionVals">
	<logic:iterate id="region" name="regionsInfos" indexId="reg_index">
								<c:if test="${region.regionCode==reg_val}">
           						<a class="current" title="${region.regionName }">${region.regionName}</a>	
           						<input name="zoneinfo" type="hidden" value="${region.regionCode}"/>									
								</c:if>
							</logic:iterate></logic:iterate>
</c:if></c:if>

					<a href="javascript:void(0)" class="defcol chemore">更多&gt;&gt;</a>

            <div class="filtermore">

              <ul class="taghot">

                <li class="current" id="sQuan">商业圈</li>

                <li id="xZhen">行政区</li>

              </ul>

              <div class="filtecolse"><a title="关闭" href="javascript:void(0)" class="colseche">关闭</a></div>

              <div class="checklist sQuan block">

                <dl>
                <logic:iterate id="biness" name="bussinessInfos">
					<dd>
							<input type="checkbox" id="businessinfo${biness_index }" value="${biness.busCode}" name="businessinfo" onclick="checkSelectCount();" />
           				  <label title="${biness.busName}">${biness.busName}</label>
           			 </dd>
				</logic:iterate>				  
                </dl>

                <div class="sour">

                  <input type="hidden" id="businessvalue" name="businessvalue" value="${businessvalue}"/>	

                  <input type="button" name="businessSubmit" class="cxbtn" value="按商圈查询" onclick="checkNotNull();"/>

                </div>

              </div>

              <div class="checklist xZhen none">
                <dl><logic:iterate id="region" name="regionsInfos" indexId="reg_index">
						 <dd>
						 		<input type="checkbox" id="zoneinfo${reg_index }" value="${region.regionCode }" name="zoneinfo" onclick="checkSelectZoneCount();"/>
							  	<label title="${region.regionName }">${region.regionName }</label>
						</dd>
						</logic:iterate>		  
                </dl>

                <div class="sour">

               	  <input type="hidden" id="zonevalue" name="zonevalue" value="${zonevalue}"/>	

                  <input type="button" name="zoneSubmit" class="cxbtn" value="按行政区查询" onclick="checkNotNull();"/>

                </div>

              </div>

            </div>

          </li>

        </ul>

      </div>

      <!--Filter criteria End-->

      <div class="paixPage">

        <div class="paixhotel"> <span>共搜索到 <EM class="tjcur"  id="bj_ht">${page.recordCount}</EM> 家酒店</span>
       
        </div>
        <div class="pages">
			<c:if test="${page.pageIndex==1}">
          <a href="javascript:void(0)" onclick="javascript:alert('已是第一页')">上一页</a>
          </c:if>
          <c:if test="${page.pageIndex!=1}">
          <a href="javascript:void(0)" onclick="javascript:document.forms[0].pages.value=${page.pageIndex-1};document.forms[0].submit();">上一页</a>
          </c:if>
          <span>${page.pageIndex}/${page.totalPage}</span>
          	<c:if test="${page.pageIndex==page.totalPage}">
          <a href="javascript:void(0)" onclick="javascript:alert('已是最后页')">下一页</a> 
          </c:if>
          <c:if test="${page.pageIndex!=page.totalPage}">
          <a href="javascript:void(0)" onclick='document.forms[0].pages.value=${page.pageIndex+1};document.forms[0].submit();'>下一页</a> 
          </c:if>
          </div>
      </div>

      <!--==========-->
    <c:if test="${fn:length(hotels)==0 || hotels==null}">
         <div class="errTips" style="display:;">
      <p><span>非常抱歉！</span></p><p>没有找到与您选择的搜索条件相符的酒店。</span></p>
      <p><em>您可以尝试改变入住离店时间或者酒店名称等条件尝试搜索或在以下酒店中选择。</em></p>
      </div>
		</c:if>
	<c:if test="${fn:length(hotels)>0 && hotels!=null}">
	<logic:iterate id="hotel" name="hotels" indexId="index">
	<div class="chamber">
        <div class="hinfos">
          <div class="infoimg"> 
				<a title="${hotel.hotelName }图片" href="hotel/loadHotels.do?op=getHotelInfo&date2=${query.checkInDate }&enddate2=${query.checkOutDate }&cityCode=${query.cityCode }&itemCode=${hotel.hotelCode }&pages=${page.pageIndex }&cityName=${query.cityName}" title="${hotel.hotelName }">
				<c:if test=""></c:if>  
				<img src="${hotel.links[0].thumNail!=null?hotel.links[0].imageUrl:'/images/onlinenone.jpg'}" width="100px" height="100px" alt="${hotel.hotelName }"/></a>
				<a title="${hotel.hotelName } 图片" href="hotel/loadHotels.do?op=getHotelInfo&date2=${query.checkInDate }&enddate2=${query.checkOutDate }&cityCode=${query.cityCode }&itemCode=${hotel.hotelCode }&pages=${page.pageIndex }&cityName=${query.cityName}" title="${hotel.hotelName }"><br/><br/></a>
          </div>

          <div class="tinfos">

            <h2><a title="${hotel.hotelName }" href="hotel/loadHotels.do?op=getHotelInfo&date2=${query.checkInDate }&enddate2=${query.checkOutDate }&cityCode=${query.cityCode }&itemCode=${hotel.hotelCode }&pages=${page.pageIndex}&cityName=${query.cityName}" title="${hotel.hotelName }">${hotel.hotelName }</a>
				<c:if test="${hotel.rankCode>0}">
				<img src="hotel/startImg/star_${hotel.rankCode }.gif" width="71" height="14" title="${hotel.rankDesc }"/>
				</c:if>
            </h2>
            <div class="bw">
              <p>
              <c:if test="${fn:length(hotel.description)>80}">
              	${fn:substring(hotel.description,0,80)}...
              </c:if>
              <c:if test="${fn:length(hotel.description)<=80}">
              	${hotel.description}
              </c:if>
              &nbsp;&nbsp;<a title="${hotel.hotelName}" href="hotel/loadHotels.do?op=getHotelInfo&date2=${query.checkInDate}&enddate2=${query.checkOutDate}&cityCode=${query.cityCode}&itemCode=${hotel.hotelCode}&pages=${page.pageIndex}&cityName=${query.cityName}" title="${hotel.hotelName }">详情>></a></p>
            </div>

            <div class="btag">
				<ul>
              <li title="${fn:trim(hotel.address) }">酒店地址：${fn:trim(hotel.address)}</li>
              <li>&nbsp;</li>
              </ul>
              <ul>
                 <li>商 业 圈：${fn:trim(hotel.business)!=""?hotel.business:"——"}</li>
                 <li>行 政 区：${fn:trim(hotel.regios)}</li>
              </ul>
            </div>
          </div>
        </div>
        <div class="hscont clearfix">

          <ul class="title-h">

            <li class="umn">房型</li>

           <!--  <li class="umn2">门市价</li> -->

            <li class="umn2">日均价</li>

            <LI class="umn3">PV值 </LI>
            
            <li class="umn4">早餐</li>

            <li class="umn5">床型</li>

            <li class="umn6">上网</li>

            <li class="umn7">支付方式</li>

            <li class="umn8">操作</li>

          </ul>
          <logic:iterate id="room" name="hotel" property="rooms" indexId="room_dex">
			<c:if test="${room_dex==3}">
			<div id="shipTxt${index}" class="hsMo">
				</c:if>
          <div class="hsList">
            <ul>
              <li class="umn">
            	  <a href="javascript:void(0)" id="cham${index }${room_dex }" title="${room.roomName}" class="expand">${room.roomName}</a>
              </li>
              <li class="umn2">
				<ins class="hTip2">¥${room.rates[0].salePrice }</ins>
              </li>
              
              <li class="umn3" style="color: red">
              <fmt:formatNumber value="${room.rates[0].commission*(1-7/100)/7.7}" pattern="#.##"></fmt:formatNumber></li>

              <li class="umn4">${room.rates[0].meal }</li>

              <li class="umn5">${fn:trim(room.bedType)!=""?room.bedType:"——" }</li>

              <li class="umn6">${room.rates[0].broadNet}</li>
              <li class="umn7">前台自付</li>
              <li class="umn8">
				<c:if test="${room.availabilitys[0].status!='-1' && room.availabilitys[0].status!='-3' && room.availabilitys[0].status!='-4'}">
  <A id="${hotel.hotelCode}${room.roomCode}" class="subbtn" title="该房型可以预定" 
  onclick="javascript:checkRoomSpecialRule('${query.checkInDate }','${query.checkOutDate }','${hotel.hotelCode }','${room.roomCode}','${query.cityCode }','${query.cityName}');return false;" 
  href="javascript:void(0)">预订</A></c:if>
  <c:if test="${room.availabilitys[0].status=='-1' || room.availabilitys[0].status=='-3' || room.availabilitys[0].status=='-4'}">
  <a href="javascript:void(0)" class="subbtned" title="该房型已满房">满房</a></c:if>
				</li>
            </ul>
            </div>
             <div class="chambar cham${index }${room_dex }"> 
              <p>床型:${room.bedType } | 上网方式:${room.rates[0].broadNet} | 房间面积:${room.area} | 楼层:${room.floors }</p>
              <p>${room.description }</p>
              <a href="javascript:void(0)" id="cham${room_index }" class="expand cofo">隐藏</a></div>
              <c:if test="${room_dex+1>3 && room_dex+1==fn:length(hotel.rooms)}">
				</div>
				</c:if>
			</logic:iterate>
			</div>
		<c:if test="${fn:length(hotel.rooms)>3}">
        <div class="mhotels">
         <a href="javascript:showDetail('shipTag${index}','shipTxt${index}')" id="shipTag${index}" >查看更多酒店房型▼</a>
        </div></c:if>
      </div>
        </logic:iterate>
        </c:if>
        <input name="op" type="hidden" value="baseHotels"/>
        <input type="hidden" value="${page.pageIndex}" name="pages" id="pages" /> 
		<input type="hidden"  value="${page.pageSize}" name="pageSize"/> 
      <!--Page Begin-->
		<%----%><paging:paging pages="${page.pageIndex}" ptotal="${page.totalPage}"/>
      <!--Page End-->

    </div>

  </div>

  </form>

  <!--Left Sidebar End-->

  <!--Right Sidebar Begin-->

  <div class="sideRight right">

    <div class="tel12580"><img src="/images/tel.jpg" width="220" height="92" /></div>

  </div>

  <!--Right Sidebar End-->

  <!--Recommended infos Begin-->
  <!--Recommended infos End-->

</div>


<div class="selects" id="alwayshotel">
		<ul>
		</ul>		
		</div>

<input id="listDivHidden"  type="hidden" value="1" />

<div id="suggest1" class="ac_results"></div>

<div id="showMapHotel" style="display:none"></div>

<!--Footer Begin-->



<!--Footer Start-->

<%@include file="../footer.jsp" %>

<!--Footer End-->

<!--Footer End-->

<script type="text/javascript" src="script/jquery.cluetip.js"></script>

<script type="text/javascript" src="script/datepicker.js"></script>

<script type="text/javascript" src="script/datepicker1.js"></script>

<script type="text/javascript" src="script/hotelcity.js"></script>

<script type="text/javascript" src="script/j.suggest.js"></script>

<script type="text/javascript" src="script/j.dimensions.js"></script>

<script type="text/javascript" src="script/hotel.js"></script>

<script type="text/javascript" src="script/hotelbase.js"></script>

<script type="text/javascript" src="script/hotelcontrastpage.js"></script>

<script type="text/javascript" src="script/hotelbasecity.js"></script>

<script type="text/javascript" src="script/jquery.layer.js"></script>

<script type="text/javascript" src="script/zDrag.js"></script>

<script type="text/javascript" src="script/zDialog.js"></script>

<script type="text/javascript">

// 显示与隐藏

function setDefaultPage(id,code){
	
	if($("#firstleaveCity").val()!=code){
		$('#'+id).val(1);
	}
	formSubmit();
}
  		
function checkRoomSpecialRule(checkin_date,checkout_date,hotel_id,roomtype_id,cityCode,cityName){
		location.href="/hotel/selectHotel.do?checkindate="+checkin_date+"&checkoutdate="+checkout_date+"&hotelid="+hotel_id+"&roomcode="+roomtype_id+"&citycode="+cityCode+"&cityName="+cityName;
}
function showDetail(id,div){

var te = $('#'+id).html();

if(te.indexOf("▼")>-1){

	$('#'+div).slideDown(0);

	$('#'+id).text("收起更多酒店房型▲");

}

else{

	$('#'+div).slideUp(0);

	$('#'+id).text("查看更多酒店房型▼");

 }

}

		</script>

<div class="showDivStyle" id="showDiv" style="display:none">

	<ul>

    <li class="tbig">您好，只能是<span id="lx"></span>天或<span id="lx_01"></span>天的整数倍的预订天数才能享受此价格。</li>

    </ul> 

    <div class="btndiv"><a href="javascript:Dialog.getInstance('0').cancelButton.onclick.apply(Dialog.getInstance('0').cancelButton,[]);" class="btn blue">关闭</a></div>

    

</div>

<div class="showDivStyle" id="showDiv_RoomState" style="display:none">

	<ul>

    <li class="tbig">您好 此期间酒店房间已经售完，您可以选择其他房型，感谢您的理解</li>

    </ul> 

    <div class="btndiv"><a href="javascript:Dialog.getInstance('0').cancelButton.onclick.apply(Dialog.getInstance('0').cancelButton,[]);location.reload();" class="btn blue">关闭</a></div>

    

</div>

<div class="showDivStyle" id="showDiv_1" style="display:none">

	<ul>

    <li class="tbig">您好 此期间酒店房间紧张，需提前<span id="tq"></span>天的预定，感谢您的理解</li>

    </ul> 

    <div class="btndiv"><a href="javascript:Dialog.getInstance('0').cancelButton.onclick.apply(Dialog.getInstance('0').cancelButton,[]);" class="btn blue">关闭</a></div>

</div>
</body>

</html>




